<template>
	<view class="list">
		<view class="item">
			<view class="top">
				<view class="top-l">
					<view class="text1">
						{{list.site}}
					</view>
					<view class="text2">{{list.address}}</view>
				</view>
				<view class="item-r">
					<view class="lebel1" :style="list.state==='箱满'?'background-color: #ff274a;':'background-color: #00c783;'">{{list.state}}</view>
					<view class="lebel2">{{list.distance}}</view>
				</view>
			</view>
			<view class="bun">
				<view class="bun-l">
					{{list.value}}
				</view>
				<view class="bun-r" @tap="gomap">
					导航
				</view>
			</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"rim-list",
		props:{
			list:{
				type:Object,
				default:{}
			}
		},
		data() {
			return {
				
			};
		},
		methods:{
			gomap(){
				uni.navigateTo({
					url:"/pages/map/map"
				})
			}
		}
	}
</script>

<style lang="less" scoped>
.list{
	display: flex;
	justify-content: center;
	align-items: center;
	width: 710rpx;
	height: 220rpx;
	border-radius: 10rpx;
	margin-top: 20rpx;
	background-color: #fff;
	.item{
		width: 670rpx;
		height: 180rpx;
		// background-color: aqua;
	}
	.top{
		display: flex;
		justify-content: space-between;
		height: 140rpx;
		width: 670rpx;
		border-bottom: 1rpx solid #f7f7f7;
	}
	.top-l{
		width: 400rpx;
		height: 140rpx;
		.text1{
			font-size: 30rpx;
			font-weight: 500;
		}
		.text2{
			margin-top: 26rpx;
			font-size: 24rpx;
			color: #707070;
		}
	}
}
.item-r{
	
	.lebel1{
		text-align: center;
		padding:  4rpx 10rpx 4rpx 10rpx;
		border-radius: 8rpx;
		font-size: 24rpx;
		color: #fff;
		background-color: #00c783;
	}
	.lebel2{
		margin-top: 30rpx;
		font-size: 22rpx;
		color: #707070;
	}
}
.bun{
	display: flex;
	justify-content: space-between;
	align-items: center;
	.bun-l{
		font-size: 22rpx;
		color: #707070;
		max-width: 550rpx;
		white-space: nowrap;
		overflow: hidden;
		text-overflow: ellipsis;
	}
	.bun-r{
		text-align: center;
		padding:  3rpx 15rpx 3rpx 15rpx;
		border-radius: 8rpx;
		font-size: 28rpx;
		color: #fff;
		background-color: #00c783;
		margin-top: 10rpx;
	}
}
</style>